/**
 * Created by Nuk, Tsinghua University.
 */

static inline void s2e_set_instruction_num(int num){
  __asm__ __volatile__(
                       ".byte 0x0f, 0x3f\n"
                       ".byte 0x00, 0x23, 0x00, 0x00\n"
                       ".byte 0x00, 0x00, 0x00, 0x00\n"
                       : : "a" (num));
  return;
}

static inline int s2e_get_instruction_num(){
  int result;
  __asm__ __volatile__(
                       ".byte 0x0f, 0x3f\n"
                       ".byte 0x00, 0x24, 0x00, 0x00\n"
                       ".byte 0x00, 0x00, 0x00, 0x00\n"
                       : "=a" (result): );
  return result;
}
